<template>
	<view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
		<view class="cu-item" v-for="(item,index) in cuIconList" :key="index" v-if="index<gridCol*2" @tap="tap(item.id)">
			<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
				<view class="cu-tag badge" v-if="item.badge!=0">
					<!-- <block v-if="item.badge!=1">{{item.badge>99?'99+':item.badge}}</block> -->
				</view>
			</view>
			<text>{{item.name}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			cuIconList:{
				type: Array
			}
		},
		methods:{
			tap(id){
				this.$emit('onTap',id)
			}
		},
		data() {
			return {
				modalName: null,
				gridCol: 5,
				gridBorder: false,
				menuBorder: false,
				menuArrow: false,
				menuCard: false,
				skin: false,
				listTouchStart: 0,
				listTouchDirection: null,
			};
		}

	}
</script>

<style>

</style>
